package pattern.behavioral.mediator.simple;

/**
 * @author: chaoyang.ren  
 * @date:Jun 22, 2017  
 * @time:3:07:09 PM   
 * @email:chaoyang.ren@foxmail.com  
 * @version: 1.0
 */
public class Test {
	public static void main(String[] args) {
		QQMediator m = new QQMediator();
		
		Colleague st = new Student("张三");
		Colleague se = new Secretary("李四");
		Colleague mo = new Monitor("王五");
		m.addColleague(st);
		m.addColleague(se);
		m.addColleague(mo);
		
		mo.setContent("明天班会！");
		st.setContent("知道了");
		se.setContent("和班主任请假了");
		
		m.notify(mo);
	}
}

